package com.aj.databases.entry;

import java.io.Serializable;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "accounts")
public class Account implements Serializable {
	private static final long serialVersionUID = 4881461403727270791L;
	public static final String ID = "account_id";
	public static final String USERID = "user_id";
	public static final String PHONE = "phone";
	public static final String PASSWORD = "password";
	public static final String TOKEN = "token";

	@DatabaseField(generatedId = true, useGetSet = true, columnName = ID)
	private Integer id;
	@DatabaseField(useGetSet = true, columnName = PHONE)
	private String phone;
	@DatabaseField(useGetSet = true, columnName = PASSWORD)
	private String password;
	@DatabaseField(useGetSet = true, columnName = TOKEN)
	private String token;
	@DatabaseField(useGetSet = true, columnName = USERID)
	private String last_used_user_id;
	@DatabaseField(foreignColumnName = User.ID, foreign = true, foreignAutoCreate = true)
	private User last_used_user;

	public Account() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public User getLast_used_user() {
		return last_used_user;
	}

	public void setLast_used_user(User last_used_user) {
		this.last_used_user = last_used_user;
	}

	public String getLast_used_user_id() {
		return last_used_user_id;
	}

	public void setLast_used_user_id(String last_used_user_id) {
		this.last_used_user_id = last_used_user_id;
	}

}
